[SPARK-47688][CORE] Support three methods of the log concatenation in the structured logging framework#45813
[SPARK-47688][CORE] Support three methods of the log concatenation in the structured logging framework#45813panbingkun wants to merge 7 commits intoapache:masterfrom
three methods of the log concatenation in the structured logging framework#45813Conversation
normal variables and MDCthree types of the log concatenation in the structured logging framework
| object MDC { | ||
|
|
||
| implicit class StringImprovements(val s: String) { | ||
| def ++(mdc: MessageWithContext): MessageWithContext = { |
There was a problem hiding this comment.
The method name cannot be called + and does not take effect, so it is called ++
|
Some of the comments were |
three types of the log concatenation in the structured logging frameworkthree methods of the log concatenation in the structured logging framework
|
|
||
| implicit class LogStringContext(val sc: StringContext) { | ||
| def log(args: MDC*): MessageWithContext = { | ||
| def log(args: Any*): MessageWithContext = { |
There was a problem hiding this comment.
The args here is intended to MDC. So that we can enforce all the variables to be MDC.
In this case, we should convert |
|
@gengliangwang |
So by the end of this project, all the log entries containing variables will use |
Okay, regarding this issue, I will investigate it carefully again. |
|
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |

What changes were proposed in this pull request?
The pr aims to support
threemethods of the logconcatenationin thestructured logging framework. eg:Why are the changes needed?
Sometimes we just want to make some
simple variable replacementsin the log text, without the need for MDCAt present, the above logs,
compilewill fail.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Add new UT.
Was this patch authored or co-authored using generative AI tooling?
No.